home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdioutp1.s < prev    next >
Text File  |  1990-11-23  |  5KB  |  148 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST Public Domain VDI bindings.
  5. ;*
  6. ;*========================================================================
  7.           
  8.           .iif      !(^^macdef VContrl),.include  "vdimacro.s"
  9.           
  10. ;*************************************************************************
  11. ;*
  12. ;* Commonly-used output functions.
  13. ;*
  14. ;*************************************************************************
  15.  
  16. ;*------------------------------------------------------------------------
  17. ;*-----------------------------------------------------------------------
  18. ;* vout_pxy.
  19. ;*  For VDI output calls that use only count and/or pxyarray.
  20. ;*  Entry: d0.w = function number.
  21. ;*         d1.w = subfunction number.
  22. ;*         d2.w = number of points in ptsin.
  23. ;*         a0.l-> ptsin array
  24. ;*-----------------------------------------------------------------------
  25. ;*------------------------------------------------------------------------
  26.  
  27. vout_pxy:
  28.  
  29.           .cargs    #8,.handle.w
  30.           link      a6,#0
  31.  
  32.           VContrl   d0,d1,d2
  33.  
  34.           subq.l    #8,sp               ;* -> ptsout
  35.           move.l    a0,-(sp)            ;* -> ptsin
  36.           subq.l    #4,sp               ;* -> intin
  37.           pea       16(sp)              ;* -> contrl
  38.  
  39.           jmp       vdicall
  40.           
  41. ;*------------------------------------------------------------------------
  42. ;* Polyline.
  43. ;*------------------------------------------------------------------------
  44.  
  45. _v_pline::
  46.           .cargs    #4,.handle.w,.count.w,.pxy.l
  47.           
  48.           moveq.l   #6,d0
  49.           moveq.l   #0,d1
  50.           move.w    .count(sp),d2
  51.           move.l    .pxy(sp),a0
  52.           bra       vout_pxy
  53.  
  54. ;*------------------------------------------------------------------------
  55. ;* Polymarker. 
  56. ;*------------------------------------------------------------------------
  57.  
  58. _v_pmarker::
  59.           .cargs    #4,.handle.w,.count.w,.pxy.l
  60.  
  61.           moveq.l   #7,d0
  62.           moveq.l   #0,d1
  63.           move.w    .count(sp),d2
  64.           move.l    .pxy(sp),a0
  65.           bra       vout_pxy
  66.           
  67. ;*------------------------------------------------------------------------
  68. ;* Filled area. 
  69. ;*------------------------------------------------------------------------
  70.  
  71. _v_fillarea::
  72.           .cargs    #4,.handle.w,.count.w,.pxy.l
  73.           
  74.           moveq.l   #9,d0
  75.           moveq.l   #0,d1
  76.           move.w    .count(sp),d2
  77.           move.l    .pxy(sp),a0
  78.           bra       vout_pxy
  79.           
  80. ;*------------------------------------------------------------------------
  81. ;* Bar.
  82. ;*------------------------------------------------------------------------
  83.  
  84. _v_bar::
  85.           .cargs    #4,.handle.w,.pxy.l
  86.           moveq.l   #11,d0
  87.           moveq.l   #1,d1
  88.           moveq.l   #2,d2
  89.           move.l    .pxy(sp),a0
  90.           bra       vout_pxy
  91.  
  92. ;*------------------------------------------------------------------------
  93. ;* Rounded and filled rounded rectangle.
  94. ;*------------------------------------------------------------------------
  95.  
  96. _v_rbox::
  97.           .cargs    #4,.handle.w,.pxy.l
  98.           moveq.l   #11,d0
  99.           moveq.l   #8,d1
  100.           moveq.l   #2,d2
  101.           move.l    .pxy(sp),a0
  102.           bra       vout_pxy
  103. _v_rfbox::
  104.           .cargs    #4,.handle.w,.pxy.l
  105.           moveq.l   #11,d0
  106.           moveq.l   #9,d1
  107.           moveq.l   #2,d2
  108.           move.l    .pxy(sp),a0
  109.           bra       vout_pxy
  110.  
  111. ;*------------------------------------------------------------------------
  112. ;* Filled rectangle.
  113. ;*------------------------------------------------------------------------
  114.  
  115. _vr_recfl::
  116.           .cargs    #4,.handle.w,.pxy.l
  117.           moveq.l   #114,d0
  118.           moveq.l   #0,d1
  119.           moveq.l   #2,d2
  120.           move.l    .pxy(sp),a0
  121.           bra       vout_pxy
  122.  
  123. ;*------------------------------------------------------------------------
  124. ;* Circle.
  125. ;*------------------------------------------------------------------------
  126.  
  127. _v_circle::
  128.           .cargs    #8,.handle.w,.x.w,.y.w,.radius.w
  129.           link      a6,#0
  130.           
  131.           clr.w     -(sp)               ;* There are some holes in the
  132.           move.w    .radius(a6),-(sp)   ;* pstin definitions for circle,
  133.           clr.l     -(sp)               ;* so build a temporary ptsin on
  134.           move.l    .x(a6),-(sp)        ;* the stack.
  135.           move.l    sp,a0               ;* Save a pointer to ptsin.
  136.  
  137.           VContrl   #11,#4,#3
  138.  
  139.           subq.l    #8,sp               ;* -> ptsout
  140.           move.l    a0,-(sp)            ;* -> ptsin
  141.           subq.l    #4,sp               ;* -> intin
  142.           pea       16(sp)              ;* -> contrl
  143.  
  144.           jmp       vdicall
  145.  
  146. ;         end of code
  147.  
  148.